// pages/category/category.js

const app = getApp();
const name = app.cooolll.name;
console.log(app.cooolll.name)
Page({

  /**
   * 页面的初始数据
   */
  data: {
    message:"哈哈哈",
    list:[]
  },

  tapButton(){ 
    this.setData({
      message:"呵呵呵"
    })
  },

  handleGetUserInfo(event){
    console.log(event.message)

  },
  onLoad(){
    console.log("onLoad")
    wx.request({
      url: 'http://appst.tcdgx.com:9091/carAPI/getMarketSiteList.do?marketService=0',

      success: (res) => {
           console.log(res)
        const data = res.data.m_object

        console.log(data)
        this.setData({
          list : data
        })

      }
      // success(res){
      //   console.log(res)
      //   const data = res.data.m_object
        
      //   console.log(data)
      //   this.setData({
      //     list : data
      //   })
         
      // }
      // success:function (res){
      //   console.log(res)
      //   const data = res.data.m_object

      //   console.log(data)
      //   this.setData({
      //     list : data
      //   })

      // }
    })
  },

  onReady() {
    console.log("onReady")
  },
  onShow(){
    console.log("onShow")
  },
  onHide(){
    console.log("onHide")
  },
  onUnload(){
    console.log("onUnload")
  },
  // 监听事件
  onReachBottom(){
    console.log("页面滚动到底部")
  },
  onPageScroll(obj){
    onsole.log("页面滚动监听")
  },
  onPullDownRefresh(){
    console.log("刷新事件")
  },

})